import { Body, Controller, Put } from '@nestjs/common';
import { User, Prisma } from '@prisma/client';
import { UserService } from '../service/user.service';

@Controller('user')
export class UserController {
  constructor(private readonly userService: UserService) {}

  @Put()
  createUser(
    @Body()
    userData: Prisma.UserCreateInput,
  ): Promise<User> {
    return this.userService.createUser(userData);
  }
}
